package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.NoteMapper;
import com.example.shoppingmall.pojo.Note;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoteService {
    @Autowired
    private NoteMapper noteMapper;

    public List<Note> noteList(@Param("phone")String phone, @Param("start")String start, @Param("end")String end, @Param("no")int no){
        return noteMapper.noteList(phone,start,end,no);
    }

    public int count(@Param("phone")String phone,@Param("start")String start,@Param("end")String end){
        return noteMapper.count(phone,start,end);
    }

    public int delete(@Param("id")int id){
        return noteMapper.delete(id);
    }

    public int add(Note note){
        return noteMapper.add(note);
    }
}
